'use strict';
function suiyimaze(params){
    this.name = 'suiyimaze';
    this.canvas = {};
}
suiyimaze.prototype = {
    constructor:suiyimaze,
    isArray:function(params){
        return !!(Object.prototype.toString.call(params).indexOf('Array') + 1);
    },
    initStage:function(params){
        if(this.isArray(params)){
            var me = this;
            params.forEach(function(v,i,a){
                me.canvas[v.name] = {};
                me.canvas[v.name].element = document.createElement('canvas');
                me.canvas[v.name].ctx = me.canvas[i].element.getContext('2d');
                for(var o in v){
                    me.canvas[v.name][o] = v[o];
                }
            });
        }
    }
}